﻿using System;
using System.Windows.Media.Imaging;
using System.Windows.Data;

namespace MedLink2011.Core
{
    public class UriToImageSourceConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            // No checks...
            return (new BitmapImage(new Uri((string)value, UriKind.Relative)));
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
